#pragma once
#include <vector>
#include <string>
#include <unordered_set>
#include "Vec2i.h"

enum class Tile { Empty, Wall, Goal, Floor };

struct LevelData {
    int width;
    int height;
    std::vector<Tile> tiles;
    std::vector<Vec2i> boxes;
    std::vector<Vec2i> goals;
    Vec2i player;
};

class Level {
public:
    static Level fromStringGrid(const std::vector<std::string>& lines);
    int width() const;
    int height() const;
    Tile tileAt(int x, int y) const;
    const std::vector<Vec2i>& goals() const;
    const std::vector<Vec2i>& boxes() const;
    const Vec2i& playerStart() const;
private:
    LevelData data;
};